<?php
namespace Common\Util;

class IndexData{
    /**
     * 获取首页广告数据
     * @param array $map
     * @param string $order
     * @return mixed
     */
    public static function getIndexAdList($map=array(),$order=""){
        $t_cms_ad = M("cms_ad");
        if(empty($order)){
            $order = "is_order Asc,id Asc";
        }
        return $t_cms_ad->where($map)->order($order)->limit(10)->select();
    }
}